package fr.vvins.core.catalog.entity.dao;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import fr.vvins.core.catalog.entity.Vin;

@Repository
public interface VinRepository extends CrudRepository<Vin, Integer> {
	@Query("from Vin where content.key = ?1")
	public Vin findByContentKey(String key);
	
	@Query("from Vin where content.id = ?1")
	public Vin findByContent(Integer id);

}
